<template>
	<view>
		<view class="cu-modal bottom-modal" :class="modalName=='goodsModal'?'show':''" @tap="modalName=''">
			<view class="cu-dialog bg bg-white" @tap.stop="">
				<view class="text-center margin-top-sm text-bold" @tap="modalName=''">收起</view>
				<view class="cu-list padding" v-if="goods">
					<view class="cu-item space-between padding-tb-sm solid-bottom" v-for="(item,index) in goods" :key="index">
						<image :src="item.url" mode="aspectFit" class="thumb"></image>
						<view class="info w100 margin-left-sm text-left">
							<view class="title">{{item.name}}</view>
							<view class="space-between align-center">
								<text class="text-price text-pink text-xl">{{item.price}}</text>
								<view class="cu-btn bg-pink round sm" @tap="goPage(item.path)">抢购</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "reward",
		props: {
			live_id: {
				type: String,
				default: '0'
			}
		},
		data() {
			return {
				modalName: '',
				goods: null
			}
		},
		destroyed() {},
		created: function(e) {},
		methods: {
			openModal(goods) {
				this.goods = goods
				this.modalName = 'goodsModal'
			}
		}
	}
</script>

<style>
	.cu-list {
		height: 800rpx;
		overflow: auto;
	}

	.thumb {
		width: 160rpx;
		height: 160rpx;
		min-width: 160rpx;
	}

	.title {
		height: 100rpx;
		overflow: hidden;
		margin-bottom: 10rpx;
	}

	.text-pink {
		color: #FF3563;
	}

	.bg-pink {
		background-color: #FF3563;
	}
</style>
